package com.aqiang9.epidemic.service.impl;

import com.aqiang9.epidemic.dao.InfoMapper;
import com.aqiang9.epidemic.pojo.Info;
import com.aqiang9.epidemic.pojo.ResultData;
import com.aqiang9.epidemic.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author aqiang9  2020-03-21
 */
@Service
public class InfoServiceImpl implements InfoService {
    @Autowired
    private InfoMapper infoMapper;

    @Override
    public List<String> getAllProvince() {
        return infoMapper.selectAllProvince();
    }

    @Override
    public Map<String, Object> getAllCount() {
        return infoMapper.selectAllCount();
    }

    @Override
    public List<Info> getProvincialLocal(String provincialName) {
        return infoMapper.selectProvincialLocal(provincialName);
    }

    @Override
    public Integer getCountConfirmCount() {
        return infoMapper.selectCountConfirmCount();
    }

    @Override
    public List<ResultData> getTopByConfirmWithProvinceLocal(String provincialName, Integer limit) {
        return infoMapper.selectTopByConfirmWithProvinceLocal(provincialName, limit);
    }

    @Override
    public List<ResultData> getTopByCureWithProvinceLocal(String provincialName, Integer limit) {
        return infoMapper.selectTopByCureWithProvinceLocal(provincialName, limit);
    }

    @Override
    public List<ResultData> getTopByDeathWithProvinceLocal(String provincialName, Integer limit) {
        return infoMapper.selectTopByDeathWithProvinceLocal(provincialName, limit);
    }

    @Override
    public List<ResultData> getAllProvinceSituation() {
        return infoMapper.selectAllProvinceSituation();
    }
}
